package com.hymall.controller.admin;

import com.hymall.bean.MarketRegion;
import com.hymall.bean.common.BaseRespVo;
import com.hymall.bean.common.CommonData;
import com.hymall.service.admin.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 长平居士 - rolfcui@outlook.com
 * @description 位置模块，显示全国所有地区
 * @date 2022/7/18 16:28
 */
@RestController
@RequestMapping("admin/region")
public class AdminRegionController {
    @Autowired
    RegionService regionService;

    @RequestMapping("list")
    public BaseRespVo list() {
        CommonData<MarketRegion> data = regionService.list();
        return BaseRespVo.ok(data);
    }
}
